const db = require('./db');
const mongoose = require('mongoose');

let usersJson = new mongoose.Schema({ //创建模型
	userName:String,
  id: String
});

let userDataModel = db.model('users', usersJson);

let dataJson = new mongoose.Schema({
	me: Object,
	menu: Array
},{ collection : 'authdata' });

let authDataModel = db.model('authdata', dataJson);

const homeschem = new mongoose.Schema({
  timelineData: Array,
  options1: Object,
  options2: Object,
  options3: Object,
  mymsg: Array
}, { collection : 'homedata' });

const homeDataModel = db.model('homedata', homeschem)

module.exports = {
  homeDataModel,
  userDataModel,
  authDataModel
};
